//
//  HeaderFooterViewe.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/5/5.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "HeaderFooterViewe.h"

@implementation HeaderFooterViewe


- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.contentView.backgroundColor = [FRUtils colorWithHexString:@"ebebeb"];
        
        _sectionButton = [[UIButton alloc] init];
        _sectionButton.frame = CGRectMake(0, 0, 300, 32);
//        NSString *titleStr = @"VIVO手机旗舰店";
//        [_sectionButton setTitle:titleStr forState:UIControlStateNormal];
//        [_sectionButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -100, 0, 0)];
        [_sectionButton setImage:[UIImage imageNamed:@"select_btn"] forState:UIControlStateNormal];
        [_sectionButton setImageEdgeInsets:UIEdgeInsetsMake(0, -115, 0, 0)];
        [self.contentView addSubview:_sectionButton];
        
        [_sectionButton addTarget:self action:@selector(checkButton:) forControlEvents:UIControlEventTouchUpInside];
        
        
    }
    return self;
}


- (void)checkButton:(UIButton *)button
{
    if (_delegate && [_delegate respondsToSelector:@selector(headerViewButtonClick:)])
    {
        [_delegate headerViewButtonClick:self];
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
